1. Field of the Invention
The present invention relates generally to computer graphics systems and, more particularly, to methods and apparatus for efficiently managing the processes performed in a computer graphics pipeline.
2. Related Art
Computer graphics systems are commonly used for displaying two- and three-dimensional graphics representations of objects on a two-dimensional video display screen. Current computer graphics systems provide highly detailed representations and are used in a variety of applications.
In a typical computer graphics system, an object to be represented on the display screen is broken down into graphics primitives. Primitives are basic components of a graphics display and may include, for example, points, lines, quadrilaterals, triangle strips, and polygons. Typically, a hardware/software scheme is implemented to render, or draw, the graphics primitives that represent a view of one or more objects being represented on the display screen.
Generally, the primitives of a three-dimensional object to be rendered are defined by a graphics application residing on a host computer in terms of primitive data. For example, when the primitive is a triangle, the host computer may define the primitive in terms of the X, Y, Z and W coordinates of its vertices, as well as the red, green, blue and alpha (R, G, B and .alpha.) color values of each vertex. Additional primitive data such as texture mapping data may be used in some applications. Rendering hardware interpolates the primitive data to compute the display screen pixels that represent each primitive, and the R, G and B color values for each pixel.
Texture mapping permits objects to be displayed with improved surface detail. Texture mapping is a method that involves mapping a source image, referred to as a texture, onto the surface of a three-dimensional object, and thereafter projecting the textured three-dimensional object to the two-dimensional graphics display screen to display the resulting image. Texture mapping involves applying one or more point elements (texels) of a texture to each point element (pixel) of the object image to which the texture is being applied. Texture mapping hardware subsystems typically include a local memory cache that stores texture mapping data associated with the portion of the object being rendered. Surface detail attributes which are commonly texture-mapped include color, specular reflection, vector perturbation, specularity, transparency, shadows, surface irregularities and grading.
The basic components of a computer graphics system typically include a computer graphics library that contains software routines which control graphics hardware in response to function calls issued by the graphics application. The graphics hardware may include, for example, a geometry accelerator, a rasterizer and a frame buffer. The system may also include other hardware such as texture mapping hardware. The geometry accelerator receives primitive data from the graphics application which defines the primitives that make up the model view to be displayed. The geometry accelerator performs transformations on the primitive data and performs such functions as lighting, clipping and plane equation calculations for each primitive. The output of the geometry accelerator, referred to as rendering data, is used by the rasterizer and the texture mapping hardware to generate final screen coordinate and color data for each pixel and each primitive. The pixel data from the rasterizer and the pixel data from the texture mapping hardware are combined and stored in the frame buffer for display on the video display screen.
The graphics library typically provides an application program interface (API) to enable graphics applications executing on the host computer to efficiently control the graphics hardware. Commonly, the OpenGL.RTM. standard is utilized to provide a graphics library API to the graphics system. (OpenGL is a registered trademark of Silicon Graphics, Inc.).
The OpenGL software interface provides specific command, that are used to specify objects and operations to produce interactive, three-dimensional graphics applications. OpenGL is a streamlined, hardware-independent interface designed to be implemented on many different hardware platforms. As such, in computer systems which support OpenGL, the operating systems and graphics application software programs can make function calls to the computer graphics system according to the standardized API without knowledge of the underlying hardware configuration.
The OpenGL standard provides a complete library of low-level graphics manipulation commands for describing models of three-dimensional objects (the "GL" of OpenGL refers to "graphics library"). This standard was originally based on the proprietary standards of Silicon Graphics, Inc., but was later transformed into an open standard which is used in high-end graphics-intensive work stations, and, more recently, in high-end personal computers. The OpenGL standard is described in the "OpenGL Programming Guide", version 1.1 (1997), the "OpenGL Reference Manual", version 1.1 (1997), and the "OpenGL Specification", version 1.1 (1997), all of which are hereby incorporated by reference in their entirety.
Various techniques have been employed to improve the performance of graphics systems. Due to the large number of at least partially independent operations which are performed in rendering a graphics image, proposals have been made to use some form of parallel architecture for graphics systems. One common approach to achieving parallelism in computer graphics processing is a technique known as pipelining. In such an approach, individual processing stages are, in effect, connected in series in an assembly-line configuration. One processing stage performs a first set of operations on one set of data, and then passes that data along to another processing stage which performs a second set of operations, while at the same time the first processing stage performs the first set of operations again on another set of data.
The graphics library is typically logically divided into software routines which are accessible through the API and perform various operations and device specific software routines which include software programs dedicated to the control of specific graphics hardware components. Together, the device specific software routines and the graphics hardware components define what is commonly referred to as a graphics pipeline. In computer systems which support OpenGL, this graphics pipeline is often referred to as an OpenGL graphics processing pipeline.
The graphics library is required to download very large quantities of data to the graphics hardware. For example, the data for a single quadrilateral may be on the order of 64 words of 32 bits each. A single frame of a graphics display typically includes hundreds of thousands of primitives. Thus, the efficiency with which primitive data is downloaded to the graphics hardware, and the speed at which the graphics hardware processes the primitive data, are important factors in achieving high speed in graphics systems. Accordingly, it is desirable to provide methods and apparatus for efficiently processing graphics information in a computer graphics system and which optimally utilizes available data bandwidth in the graphics pipeline.